<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
    <form action="" method="post" id="myform">
    	 <input type="text" style="width: 300px;height: 100px;"><br>
    	 <button type="submit" value="">发表</button>



    </form>
	 <script type="text/javascript">
        var myform = document.getElementById('myform');
       
       //获取单击事件
        myform.onsubmit = function()
	{    
		alert('获取了某某');
		//阻止默认行为
		return false;
	}
	 </script>
</body>
</html>